package org.colafries.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.colafries.common.enums.ColumnDataTypeEnum;
import org.colafries.common.enums.ColumnTypeEnum;
import org.colafries.common.enums.Flag;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author colafries
 * @version v1.0
 * @ClassName DataModelConfigRspVO
 * @Description
 * @date Created in 2024/4/18
 **/
@Data
public class DataModelConfigRspVO {
    @ApiModelProperty(name = "id")
    private Integer id;
    @ApiModelProperty(name = "数据模型id", dataType = "Integer")
    private Integer dataModelId;
    @ApiModelProperty(name = "自定义表id", dataType = "Integer")
    private Integer tableId;
    @ApiModelProperty(name = "字段hash值", dataType = "String")
    private String fieldHash;
    @ApiModelProperty(name = "物理字段名", dataType = "String")
    private String field;
    @ApiModelProperty(name = "列别名", dataType = "String")
    private String alias;
    @ApiModelProperty(name = "默认聚合", dataType = "String")
    private String defaultAggregator;
    @ApiModelProperty(name = "计算表达式", dataType = "String")
    private String expression;
    @ApiModelProperty(value = "是否计算度量", dataType = "Boolean", example = "YES NO")
    private Flag calculatedFlag;
    @ApiModelProperty(name = "字段类型", dataType = "String", example = "DIMENSION | MEASURE")
    private ColumnTypeEnum type;
    @ApiModelProperty(name = "数据类型", dataType = "String", example = "")
    private ColumnDataTypeEnum dataType;
    @ApiModelProperty(name = "筛选标识",dataType = "String",example = "YES NO")
    private Flag filterFlag;

    @ApiModelProperty(name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(name = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(name = "数据精度", dataType = "Integer", example = "2")
    private Integer accuracy;
    @ApiModelProperty(name = "数据格式", dataType = "String", example = "")
    private String dataFormat;
    @ApiModelProperty(name = "数据单位", dataType = "String", example = "")
    private String unit;

}
